package enumandlambda;

/**
 * @author shkstart
 * 使用lambda 来创建 Runnable
 * @create 2022-11-28-13:41
 */
public class ThreadDemo6 {
    public static void main(String[] args) {
//        创建线程
        Thread thread = new Thread(()->{
            //具体的业务
            Thread t= Thread.currentThread();
            System.out.println("任务执行：" +t.getName());
        });
        thread.start();
    }
}
